package com.bytz.modules.cms.common.util;

import com.bytz.modules.cms.common.model.CategoryDiscountSearchVo;

public class CmsCacheKeyUtil {

    /**
     * 计算产品线等级Key
     * @param prefix 缓存前缀
     * @param id id
     * @return 缓存Key
     */
    public static String getProductLineLevelKey(String prefix, String id) {
        return prefix + ":" + id;
    }

    /**
     * 计算分类折扣Key
     * @param vo 查询Vo
     * @return Key
     */
    public static String getProductCategoryDiscountKey(String prefix, CategoryDiscountSearchVo vo) {
        return prefix + ":" + vo.getProductCategoryId() + ":" + vo.getProductLineLevelId();
    }
}
